<?php
namespace core\tv\logic;

use core\Logic;
use core\tv\model\StoreGroupModel;

class StoreLogic extends Logic
{
    /**
     * 获取门店分组下拉
     * 
     * @return array
     */
    public function getStoreGroup()
    {
        return StoreGroupModel::getInstance()
        ->field('id as value, group_name as name')
        ->order('sort desc')
        ->select();
    }

    /**
     * 获取点播状态单选
     *
     * @return array
     */
    public function getIsOndemand()
    {
        return [
            [
                'name'  => '是',
                'value' => 1
            ],
            [
                'name'  => '否',
                'value' => 0
            ]
        ];
    }

    /**
     * 获取门店状态单选
     * 
     * @return array
     */
    public function getStoreStatus()
    {
        return [
            [
                'name'  => '正常',
                'value' => 1
            ],
            [
                'name'  => '禁用',
                'value' => 0
            ]
        ];
    }

}
